<template>
  <div class="header">
    <span class="left" v-show="leftShow" @click="close"><</span>
    <h2>{{title}}</h2>
    <span class="right">...</span>
  </div>
</template>

<script>
export default {
  props:{
    leftShow:{
      type:Boolean,
      required:false,
      default:true
    },
    title:{
      type:String,
      required:true
    }
  },
  methods:{
    close(){
      this.bus.$emit('close','传递数据')
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
.header{
  width:100%;
  height: 40px;
  background: #eee; 
  position: relative;
  text-align: center;
  font-size:16px;
  line-height: 40px;
  .left{
    position: absolute;
    top:0;
    left:10px;
  }
  .right{
    position: absolute;
    top:0;
    right:10px;
  }
}
</style>
